package com.car.server.impl;

import com.car.dao.impl.AdminCarDaoImpl;
import com.car.domain.Admin;
import com.car.domain.Car;
import com.car.server.AdminCarSever;
import com.car.utils.JDBCUtil;

import java.util.List;

/**
 * 实现
 */
public class AdminCarSeverImpl implements AdminCarSever {
    @Override
    public List<Car> inquireMyCar(Admin admin) {
        return new AdminCarDaoImpl().inquireMyCar(admin);
    }

    @Override
    public List<Car> inquireAllCar() {
        return new AdminCarDaoImpl().inquireAllCar();
    }

    @Override
    public int AddCarServer(Car car) {
        return new AdminCarDaoImpl().AddCarServer(car, JDBCUtil.getId());
    }

    @Override
    public int deleteCar(String s) {
        return new AdminCarDaoImpl().deleteCar(s);
    }

    @Override
    public Car AmendCarServer(String s) {
        return new AdminCarDaoImpl().AmendCarServer(s);
    }

    @Override
    public int AmendCarServerEnd(Car car) {
        return new AdminCarDaoImpl().AmendCarServerEnd(car);
    }
}
